# plot for the top 20 by total of fatalities and injuries
g <- ggplot(state_harm, aes(x = values,
y = reorder(state_name, number_of_events),
colour = label),
size = 3, shape = 22) +
theme_economist() +
scale_colour_stata() +
geom_point() +
labs(x = NULL,
y = NULL,
colour = NULL,
title = "Destructive Weather Events in the United States",
subtitle = "Source: National Climatic Data Center Storm Events 1950 - 2011",
caption = "*Damages are estimates\n1950-54 only tornado events recorded\n 1955-92 only tornado, thunderstorm wind and hail events keyed to digital\n1993-95 only tornado, thunderstorm wind and hail events keyed to digital") +
guides(fill = guide_legend(title = NULL)) +
scale_fill_discrete(labels = c("Fatalities",
"Injuries",
"Events",
"Damages $10,000s")) +
theme(
legend.position = "bottom",
panel.grid.major.x = element_line(colour = "white",
size = 1,
linetype = "dotted")) +
scale_x_log10(breaks = c(1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7),
labels = c("10", "100", "1,000","10,000", "100,000", "1,000,000", "10,000,000"))
ggplotly(g)